﻿using System.Web.Mvc;

namespace BoneSystem.Extensions.Annotations.InputTypeAnnotations
{
    public class FileUploadAttribute : InputAttribute, IInputPathernAttribute
    {
        public string Pathern { get; set; }
        public override TagBuilder TagBuilder()
        {
            var tag = base.TagBuilder();
            tag.Attributes["type"] = "file";
            tag.Attributes["uploader"] = NgModel;
            if (tag.Attributes.ContainsKey("ng-model"))
            {
                tag.Attributes.Remove("ng-model");
            }
            return tag;
        }

        
    }
}
